Practically Making Threads Deterministic and Stable

ثبت نشده
چکیده

Multithreaded programs are hard to get right. A key reason is that the contract between developers and runtimes grants exponentially many schedules to the runtimes. Two approaches improve correctness by reducing schedules. Deterministic multithreading (DMT) reduces schedules for each input down to one. Stable multithreading (SMT) reduces schedules for all inputs, increasing coverage of checking tools and providing broader repeatability than just determinism (e.g., “similar inputs lead to similar behaviors” and “adding debug printf doesn’t mask bugs”). However, despite years of effort, two difficult questions remain open. First, can the DMT and SMT approaches consistently achieve good performance on a wide range of programs? Second, can the approaches be made simple and adoptable? These concerns are not helped much by the limited evaluation of prior systems. We present PARROT, a simple, practical runtime that makes threads deterministic and stable by offering a new contract to developers. By default, it runs synchronizations in each thread in the well-defined round-robin order vastly reducing schedules and providing broad repeatability. When default schedules are slow, it allows advanced developers to write intuitive performance hints in code to switch or add schedules for speed. We believe this “meet in the middle” contract makes it easier to write correct, efficient programs. We further present an ecosystem formed by integrating PARROT with a model checker called DBUG. This ecosystem is more effective than either system alone: DBUG checks the schedules that matter to PARROT, and PARROT greatly increases the coverage of DBUG. Results on a diverse set of 108 programs, roughly one order of magnitude more than any prior evaluation, show that PARROT is easy to use (averaging 1.2 lines of hints per program); achieves low overhead (8.3% for 55 real-world programs and 19.5% for all 108 programs), many times better than two prior systems; scales well to maximum allowed cores on a 24-core server and to different scales/types of workloads; and increases coverage of DBUG by at least 10 for most programs. PARROT’s source code, entire benchmark suite, and results are at http://anonymized.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Stability Analysis and Optimal Control of Vaccination and Treatment of a SIR Epidemiological Deterministic Model with Relapse

In this paper, we studied and formulated the relapsed SIR model of a constant size population with standard incidence rate. Also, the optimal control problem with treatment and vaccination as controls, subject to the model is formulated. The analysis carried out on the model, clearly showed that the infection free steady state is globally asymptotically stable if the bas...

متن کامل

Low-Deterministic Security For Low-Nondeterministic Programs

We present a new algorithm, together with a full soundness proof, which guarantees probabilistic noninterference (PN) for concurrent programs. The algorithm follows the “low-deterministic security” (LSOD) approach, but for the first time allows general low-nondeterminism as long as PN is not violated. The algorithm is based on the earlier observation by Giffhorn and Snelting that low-nondetermi...

متن کامل

A Deterministic Interpreter Simulating a Distributed Real Time System Using VDM

The real time dialect of VDM, called VDM-RT, contains constructs for describing concurrent threads, synchronisation of such threads and the distribution of object instances and their threads over multiple CPUs with busses connecting them. Tools that simulate an executable subset of VDM-RT models benefit from being deterministic so that problems are reproducible and can be more easily investigat...

متن کامل

A class of fuzzy random programming and its application to parallel machine scheduling∗

In many basic scheduling models, jobs’ processing times and due-dates are deterministic. Practically, they are as uncertain variables in some more models. Furthermore, in a real situation of decision making, there exists uncertainty that can not be described only by fuzziness but also randomness. The purpose of this paper is to develop a methodology for parallel machines scheduling problem with...

متن کامل

Gamma Photon Transport on the GPU for PET

This paper proposes a Monte Carlo algorithm for gammaphoton transport, that partially reuses random paths and is appropriate for parallel GPU implementation. According to the requirements of the application of the simulation results in reconstruction algorithms, the method aims at similar relative rather than absolute errors of the detectors. The resulting algorithm is SIMD-like, which is a req...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013